﻿$(document).ready(function () {
    // NAVIGATION ROLL DOWN
    var navigationHeight = $("#navigation").height();

    $('#navbar a').click(function (e) {
        if (navigator.userAgent.search(/ipad/i) > 0) {
            e.preventDefault();

        }

    });



    $("#navigation").height(0).show();
    $("#navigationwrapper").hover(
		function () {
		    $("#navigation").stop(true, false).animate({ height: navigationHeight }, 400);
		},
		function () {
		    $("#navigation").stop(true, false).animate({ height: 0 }, 400);
		}
	)

});

function showhidden(obj, opt, opt1) {
    for (var i = 1; i <= opt1; i++) {
        if (opt == i) {
            document.getElementById(obj + "_" + i).style.display = "";
            document.getElementById(obj + "d" + i).className = "shizheng";

        } else {
            document.getElementById(obj + "_" + i).style.display = "none";
            document.getElementById(obj + "d" + i).className = "shizheng1";
        }
    }
}

function showhidden(opt, opt1) {
    for (var i = 1; i <= opt1; i++) {
        if (opt == i) {
            $('#accordion-toggle' + i).addClass("active");
            $('#tab' + i).addClass("active");
            $('#tab' + i).css('height', "auto");
        } else {
            $('#accordion-toggle' + i).removeClass("active");
            $('#tab' + i).removeClass("active");
            $('#tab' + i).css('height', "0px");
        }
    }
}